home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / YAM / Source / includes / mui / TextEditor_mcc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-15  |  7.4 KB  |  147 lines

  1. /*
  2. **
  3. ** $VER: TextEditor_mcc.h V15.9 (21-May-00)
  4. ** Copyright © 2000 Allan Odgaard. All rights reserved.
  5. **
  6. */
  7.  
  8. #ifndef   TEXTEDITOR_MCC_H
  9. #define   TEXTEDITOR_MCC_H
  10.  
  11. #ifndef   EXEC_TYPES_H
  12. #include  <exec/types.h>
  13. #endif
  14.  
  15. #define   MUIC_TextEditor     "TextEditor.mcc"
  16. #define   TextEditorObject    MUI_NewObject(MUIC_TextEditor
  17.  
  18. #define   TextEditor_Dummy   (0xad000000)
  19.  
  20. #define   MUIA_TextEditor_AreaMarked        (TextEditor_Dummy + 0x14)
  21. #define   MUIA_TextEditor_AutoClip          (TextEditor_Dummy + 0x34)
  22. #define   MUIA_TextEditor_ColorMap          (TextEditor_Dummy + 0x2f)
  23. #define   MUIA_TextEditor_Columns           (TextEditor_Dummy + 0x33)
  24. #define   MUIA_TextEditor_Contents          (TextEditor_Dummy + 0x02)
  25. #define   MUIA_TextEditor_CursorPosition    (TextEditor_Dummy + 0x35)
  26. #define   MUIA_TextEditor_CursorX           (TextEditor_Dummy + 0x04)
  27. #define   MUIA_TextEditor_CursorY           (TextEditor_Dummy + 0x05)
  28. #define   MUIA_TextEditor_DoubleClickHook   (TextEditor_Dummy + 0x06)
  29. #define   MUIA_TextEditor_ExportHook        (TextEditor_Dummy + 0x08)
  30. #define   MUIA_TextEditor_ExportWrap        (TextEditor_Dummy + 0x09)
  31. #define   MUIA_TextEditor_FixedFont         (TextEditor_Dummy + 0x0a)
  32. #define   MUIA_TextEditor_Flow              (TextEditor_Dummy + 0x0b)
  33. #define   MUIA_TextEditor_HasChanged        (TextEditor_Dummy + 0x0c)
  34. #define   MUIA_TextEditor_HorizontalScroll  (TextEditor_Dummy + 0x2d) /* Private and experimental! */
  35. #define   MUIA_TextEditor_ImportHook        (TextEditor_Dummy + 0x0e)
  36. #define   MUIA_TextEditor_ImportWrap        (TextEditor_Dummy + 0x10)
  37. #define   MUIA_TextEditor_InsertMode        (TextEditor_Dummy + 0x0f)
  38. #define   MUIA_TextEditor_InVirtualGroup    (TextEditor_Dummy + 0x1b)
  39. #define   MUIA_TextEditor_KeyBindings       (TextEditor_Dummy + 0x11)
  40. #define   MUIA_TextEditor_NumLock           (TextEditor_Dummy + 0x18)
  41. #define   MUIA_TextEditor_Pen               (TextEditor_Dummy + 0x2e)
  42. #define   MUIA_TextEditor_PopWindow_Open    (TextEditor_Dummy + 0x03) /* Private!!! */
  43. #define   MUIA_TextEditor_Prop_DeltaFactor  (TextEditor_Dummy + 0x0d)
  44. #define   MUIA_TextEditor_Prop_Entries      (TextEditor_Dummy + 0x15)
  45. #define   MUIA_TextEditor_Prop_First        (TextEditor_Dummy + 0x20)
  46. #define   MUIA_TextEditor_Prop_Release      (TextEditor_Dummy + 0x01) /* Private!!! */
  47. #define   MUIA_TextEditor_Prop_Visible      (TextEditor_Dummy + 0x16)
  48. #define   MUIA_TextEditor_Quiet             (TextEditor_Dummy + 0x17)
  49. #define   MUIA_TextEditor_ReadOnly          (TextEditor_Dummy + 0x19)
  50. #define   MUIA_TextEditor_RedoAvailable     (TextEditor_Dummy + 0x13)
  51. #define   MUIA_TextEditor_Rows              (TextEditor_Dummy + 0x32)
  52. #define   MUIA_TextEditor_Separator         (TextEditor_Dummy + 0x2c)
  53. #define   MUIA_TextEditor_Slider            (TextEditor_Dummy + 0x1a)
  54. #define   MUIA_TextEditor_StyleBold         (TextEditor_Dummy + 0x1c)
  55. #define   MUIA_TextEditor_StyleItalic       (TextEditor_Dummy + 0x1d)
  56. #define   MUIA_TextEditor_StyleUnderline    (TextEditor_Dummy + 0x1e)
  57. #define   MUIA_TextEditor_TypeAndSpell      (TextEditor_Dummy + 0x07)
  58. #define   MUIA_TextEditor_UndoAvailable     (TextEditor_Dummy + 0x12)
  59. #define   MUIA_TextEditor_WrapBorder        (TextEditor_Dummy + 0x21)
  60.  
  61. #define   MUIM_TextEditor_AddKeyBindings    (TextEditor_Dummy + 0x22)
  62. #define   MUIM_TextEditor_ARexxCmd          (TextEditor_Dummy + 0x23)
  63. #define   MUIM_TextEditor_BlockInfo         (TextEditor_Dummy + 0x30)
  64. #define   MUIM_TextEditor_ClearText         (TextEditor_Dummy + 0x24)
  65. #define   MUIM_TextEditor_ExportText        (TextEditor_Dummy + 0x25)
  66. #define   MUIM_TextEditor_HandleError       (TextEditor_Dummy + 0x1f)
  67. #define   MUIM_TextEditor_InsertText        (TextEditor_Dummy + 0x26)
  68. #define   MUIM_TextEditor_MacroBegin        (TextEditor_Dummy + 0x27)
  69. #define   MUIM_TextEditor_MacroEnd          (TextEditor_Dummy + 0x28)
  70. #define   MUIM_TextEditor_MacroExecute      (TextEditor_Dummy + 0x29)
  71. #define   MUIM_TextEditor_MarkText          (TextEditor_Dummy + 0x2c)
  72. #define   MUIM_TextEditor_Replace           (TextEditor_Dummy + 0x2a)
  73. #define   MUIM_TextEditor_Search            (TextEditor_Dummy + 0x2b)
  74. struct    MUIP_TextEditor_ARexxCmd          { ULONG MethodID; STRPTR command; };
  75. struct    MUIP_TextEditor_BlockInfo         { ULONG MethodID; ULONG *startx; ULONG *starty; ULONG *stopx; ULONG *stopy; };
  76. struct    MUIP_TextEditor_ClearText         { ULONG MethodID; };
  77. struct    MUIP_TextEditor_ExportText        { ULONG MethodID; };
  78. struct    MUIP_TextEditor_HandleError       { ULONG MethodID; ULONG errorcode; }; /* See below for error codes */
  79. struct    MUIP_TextEditor_InsertText        { ULONG MethodID; STRPTR text; LONG pos; }; /* See below for positions */
  80. struct    MUIP_TextEditor_Search            { ULONG MethodID; STRPTR string; LONG flags; }; /* See below for flags */
  81.  
  82. #define   MUIV_TextEditor_ExportHook_Plain       0x00000000
  83. #define   MUIV_TextEditor_ExportHook_EMail       0x00000001
  84.  
  85. #define   MUIV_TextEditor_Flow_Left              0x00000000
  86. #define   MUIV_TextEditor_Flow_Center            0x00000001
  87. #define   MUIV_TextEditor_Flow_Right             0x00000002
  88. #define   MUIV_TextEditor_Flow_Justified         0x00000003
  89.  
  90. #define   MUIV_TextEditor_ImportHook_Plain       0x00000000
  91. #define   MUIV_TextEditor_ImportHook_EMail       0x00000002
  92. #define   MUIV_TextEditor_ImportHook_MIME        0x00000003
  93. #define   MUIV_TextEditor_ImportHook_MIMEQuoted  0x00000004
  94.  
  95. #define   MUIV_TextEditor_InsertText_Cursor      0x00000000
  96. #define   MUIV_TextEditor_InsertText_Top         0x00000001
  97. #define   MUIV_TextEditor_InsertText_Bottom      0x00000002
  98.  
  99. #define   MUIV_TextEditor_LengthHook_Plain       0x00000000
  100. #define   MUIV_TextEditor_LengthHook_ANSI        0x00000001
  101. #define   MUIV_TextEditor_LengthHook_HTML        0x00000002
  102. #define   MUIV_TextEditor_LengthHook_MAIL        0x00000003
  103.  
  104. /* Flags for MUIM_TextEditor_Search */
  105. #define MUIF_TextEditor_Search_FromTop       (1 << 0)
  106. #define MUIF_TextEditor_Search_Next          (1 << 1)
  107. #define MUIF_TextEditor_Search_CaseSensitive (1 << 2)
  108. #define MUIF_TextEditor_Search_DOSPattern    (1 << 3)
  109. #define MUIF_TextEditor_Search_Backwards     (1 << 4)
  110.  
  111. /* Error codes given as argument to MUIM_TextEditor_HandleError */
  112. #define   Error_ClipboardIsEmpty         0x01
  113. #define   Error_ClipboardIsNotFTXT       0x02
  114. #define   Error_MacroBufferIsFull        0x03
  115. #define   Error_MemoryAllocationFailed   0x04
  116. #define   Error_NoAreaMarked             0x05
  117. #define   Error_NoMacroDefined           0x06
  118. #define   Error_NothingToRedo            0x07
  119. #define   Error_NothingToUndo            0x08
  120. #define   Error_NotEnoughUndoMem         0x09 /* This will cause all the stored undos to be freed */
  121. #define   Error_StringNotFound           0x0a
  122. #define   Error_NoBookmarkInstalled      0x0b
  123. #define   Error_BookmarkHasBeenLost      0x0c
  124.  
  125. struct ClickMessage
  126. {
  127.    STRPTR  LineContents;  /* This field is ReadOnly!!! */
  128.    ULONG   ClickPosition;
  129. };
  130.  
  131. /* Definitions for Separator type */
  132.  
  133. #define LNSB_Top             0 /* Mutual exclude: */
  134. #define LNSB_Middle          1 /* Placement of    */
  135. #define LNSB_Bottom          2 /*  the separator  */
  136. #define LNSB_StrikeThru      3 /* Let separator go thru the textfont */
  137. #define LNSB_Thick           4 /* Extra thick separator */
  138.  
  139. #define LNSF_Top             (1<<LNSB_Top)
  140. #define LNSF_Middle          (1<<LNSB_Middle)
  141. #define LNSF_Bottom          (1<<LNSB_Bottom)
  142. #define LNSF_StrikeThru      (1<<LNSB_StrikeThru)
  143. #define LNSF_Thick           (1<<LNSB_Thick)
  144.  
  145.  
  146. #endif /* TEXTEDITOR_MCC_H */
  147.